﻿@model DAL.Models.Prestamos

@{
    ViewBag.Title = "Nuevo";
}

<h2>Nuevo</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Prestamos</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.SocioId, "Socio")
        </div>
        <div class="editor-field">
            @Html.DropDownList("SocioId", String.Empty)
            @Html.ValidationMessageFor(model => model.SocioId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EjemplarId, "Ejemplar")
        </div>
        <div class="editor-field">
            @Html.DropDownList("EjemplarId", String.Empty)
            @Html.ValidationMessageFor(model => model.EjemplarId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EstadoPrestamoId, "Estado del Prestamo")
        </div>
        <div class="editor-field">
            @Html.DropDownList("EstadoPrestamoId", String.Empty)
            @Html.ValidationMessageFor(model => model.EstadoPrestamoId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FechaEstimadaDevolucion, "Fecha Estimada de Devolucion")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FechaEstimadaDevolucion)
            @Html.ValidationMessageFor(model => model.FechaEstimadaDevolucion)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FechaEfectivaDevolucion, "Fecha Efectiva de Devolucion")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FechaEfectivaDevolucion)
            @Html.ValidationMessageFor(model => model.FechaEfectivaDevolucion)
        </div>

        <p>
            <input type="submit" value="Crear" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Volver al Listado", "Index")
</div>
